package com.bishe.demo.modules.hotel.hotelFacilityAndService.dao;

import com.bishe.demo.modules.hotel.hotelFacilityAndService.entity.HServiceUser;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.springframework.stereotype.Repository;

@Mapper
@Repository
public interface HServiceUserDao {
    @Insert("insert into hotel_h_service_user values(null,#{hServiceId},#{userId})")
    @Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id")
    void insertHServiceUser(HServiceUser hServiceUser);

    @Delete("delete from hotel_h_service_user where h_service_id=#{hServiceId}")
    void deleteByhServiceId(int gethServiceId);
}
